using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using KPIS.GERP.Models.Class;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmInventoryStockTaking")]
    public class InventoryStockTaking
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember]
        public int StockTakingId { get; set; }

        [DataMember, Display(Name = "StockTakingCode", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public string StockTakingCode { get; set; }

        [CustomRequired]
		[DataMember, Display(Name = "StockTakingStartDate", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<System.DateTime> StockTakingStartDate { get; set; }

		[DataMember, Display(Name = "StockTakingEndDate", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<System.DateTime> StockTakingEndDate { get; set; }

        [CustomRequired]
		[DataMember, Display(Name = "StockTakingDesc", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public string StockTakingDesc { get; set; }

		[DataMember, Display(Name = "StockTakingRemark", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public string StockTakingRemark { get; set; }

        [CustomRequired]
		[ForeignKey("JobSite")]
		[DataMember, Display(Name = "JobSiteId", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<int> JobSiteId { get; set; }

        [CustomRequired]
        [ForeignKey("Warehouse")]
        [DataMember, Display(Name = "IcmWhId", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<int> IcmWhId { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<int> CreatedBy { get; set; }

        [CustomRequired]
		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

		[DataMember, Display(Name = "ApprovedBy", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<int> ApprovedBy { get; set; }

		[DataMember, Display(Name = "ApprovedWhen", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<System.DateTime> ApprovedWhen { get; set; }

		[DataMember, Display(Name = "ApprovedRemark", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public string ApprovedRemark { get; set; }

		[DataMember, Display(Name = "CancelBy", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<int> CancelBy { get; set; }

		[DataMember, Display(Name = "CancelWhen", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public Nullable<System.DateTime> CancelWhen { get; set; }

		[DataMember, Display(Name = "CancelRemark", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public string CancelRemark { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public string RecordStatus { get; set; }

        [ForeignKey("MasResourceType")]
        [DataMember, Display(Name = "ResourceTypeId", ResourceType = typeof(Resources.InventoryStockTakingResource))]
        public int ResourceTypeId { get; set; }

        [DataMember]
        public virtual  HRM.JobSite JobSite { get; set; }

        [DataMember]
        public virtual ICM.Warehouse Warehouse { get; set; }

        [DataMember]
        public virtual MasResourceType MasResourceType { get; set; }
    }
}